package com.cinyi.cyds.test.db;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

import com.cinyi.ormlite.core.BaseModel;
import com.cinyi.ormlite.annotation.TConstrains;
import com.cinyi.ormlite.annotation.TField;
import com.cinyi.ormlite.annotation.TOne2many;
import com.cinyi.ormlite.annotation.TSchema;
import com.cinyi.ormlite.annotation.TTable;
import com.cinyi.cyds.base.model.Tresource;

@TSchema
@TTable( "tresourcetype")
public class Tresourcetype2 extends BaseModel {

	@TField(name="id",constrains=@TConstrains(primaryKey=true),length=36)
	private String id;
	
	@TField(name = "name",constrains=@TConstrains(notNull=true) , length=100)
	private String name;
	
	@TOne2many(type=Tresource.class,lazy=true,ref="tresourcetypeId")
	private List<Tresource> tresources = null;

	public Tresourcetype2() {
	}

	public Tresourcetype2(String id, String name) {
		this.id = id;
		this.name = name;
	}

	public Tresourcetype2(String id, String name, List<Tresource> tresources) {
		this.id = id;
		this.name = name;
		this.tresources = tresources;
	}

	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<Tresource> getTresources() {
		return this.tresources;
	}

	public void setTresources(List<Tresource> tresources) {
		this.tresources = tresources;
	}

}
